"use strict";

// 导入原始模块

import { NpipeSocketStrategy } from 'testcontainers/build/container-runtime/strategies/npipe-socket-strategy.js';

export function PatchedNpipeSocketStrategy() {
    // 替换方法的实现
    NpipeSocketStrategy.prototype.getResult = async function () {
        return {
            uri: "npipe:////./pipe/podman-machine-default",
            dockerOptions: { socketPath: "//./pipe/podman-machine-default" },
            composeEnvironment: {
                DOCKER_CUSTOM_ENV: "true"
            },
            allowUserOverrides: true,
        };
    };

    // 可以类似地替换其他方法
    NpipeSocketStrategy.prototype.getName = function () {
        return "PatchedNpipeSocketStrategy";
    };
}